_base_ = ['../../configs/mask_rcnn/mask_rcnn_r50_fpn_2x_coco.py']
dataset_type = 'CocoDataset'
classes = ('artemisia', 'chenopodiaceae', 'moraceae', 'gramineae', 'pinaceae')
img_norm_cfg = dict(
    mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True)
train_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(type='LoadAnnotations', with_bbox=True, with_mask=True),
    dict(type='Resize', img_scale=(512, 512), keep_ratio=True),
    dict(type='RandomFlip', flip_ratio=0.5),
    dict(type='Normalize', **img_norm_cfg),
    dict(type='Pad', size_divisor=32),
    dict(type='DefaultFormatBundle'),
    dict(type='Collect', keys=['img', 'gt_bboxes', 'gt_labels', 'gt_masks']),
]
test_pipeline = [
    dict(type='LoadImageFromFile'),
    dict(
        type='MultiScaleFlipAug',
        img_scale=(512, 512),
        flip=False,
        transforms=[
            dict(type='Resize', keep_ratio=True),
            dict(type='RandomFlip'),
            dict(type='Normalize', **img_norm_cfg),
            dict(type='Pad', size_divisor=32),
            dict(type='ImageToTensor', keys=['img']),
            dict(type='Collect', keys=['img']),
        ])
]
data = dict(
    samples_per_gpu=2,
    workers_per_gpu=2,
    train=dict(
        type=dataset_type,
        # explicitly add your class names to the field `classes`
        classes=classes,
        pipeline=train_pipeline,
        ann_file='/home/ubuntu/code/mmdetection-master/pollen_data/paper_train.json',
        img_prefix='/home/ubuntu/code/detectron2-latest/datasets/pollen_data/0318/imgs'),
    val=dict(
        type=dataset_type,
        # explicitly add your class names to the field `classes`
        pipeline=test_pipeline,
        classes=classes,
        ann_file='/home/ubuntu/code/mmdetection-master/pollen_data/paper_val.json',
        img_prefix='/home/ubuntu/code/detectron2-latest/datasets/pollen_data/0318/imgs'),
    test=dict(
        type=dataset_type,
        # explicitly add your class names to the field `classes`
        pipeline=test_pipeline,
        classes=classes,
        ann_file='/home/ubuntu/code/mmdetection-master/pollen_data/paper_test.json',
        img_prefix='/home/ubuntu/code/detectron2-latest/datasets/pollen_data/0318/imgs'))
model = dict(
    roi_head=dict(
        bbox_head=dict(
            type='Shared2FCBBoxHead',
            num_classes=5,
        ),
        mask_head=dict(
            type='FCNMaskHead',
            num_classes=5,
        )
    )
)


load_from = '/home/ubuntu/code/mmdetection-master/checkpoints/mask_rcnn_r50_fpn_2x_coco_bbox_mAP-0.392__segm_mAP-0.354_20200505_003907-3e542a40.pth'
work_dir = '/home/ubuntu/code/mmdetection-master/result/mask-rcnn'